package com.zezheng.qian.project.system.service.impl;

import java.util.List;

import com.zezheng.qian.project.system.domain.SysUserCollect;
import com.zezheng.qian.project.system.mapper.SysUserCollectMapper;
import com.zezheng.qian.project.system.service.ISysUserCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户和角色关联Service业务层处理
 *
 * @author cuijie
 * @date 2022-02-07
 */
@Service
public class SysUserCollectServiceImpl implements ISysUserCollectService
{
    @Autowired
    private SysUserCollectMapper sysUserCollectMapper;

    /**
     * 查询用户收藏
     *
     * @param id 用户收藏主键
     * @return 用户收藏
     */
    @Override
    public SysUserCollect selectSysUserCollectById(Long id)
    {
        return sysUserCollectMapper.selectSysUserCollectById(id);
    }

    /**
     * 查询用户收藏列表
     *
     * @param sysUserCollect 用户收藏
     * @return 用户收藏
     */
    @Override
    public List<SysUserCollect> selectSysUserCollectList(SysUserCollect sysUserCollect)
    {
        return sysUserCollectMapper.selectSysUserCollectList(sysUserCollect);
    }

    /**
     * 新增用户收藏
     *
     * @param sysUserCollect 用户收藏
     * @return 结果
     */
    @Override
    public int insertSysUserCollect(SysUserCollect sysUserCollect)
    {
        return sysUserCollectMapper.insertSysUserCollect(sysUserCollect);
    }

    /**
     * 修改用户收藏
     *
     * @param sysUserCollect 用户收藏
     * @return 结果
     */
    @Override
    public int updateSysUserCollect(SysUserCollect sysUserCollect)
    {
        return sysUserCollectMapper.updateSysUserCollect(sysUserCollect);
    }

    /**
     * 批量删除用户收藏
     *
     * @param ids 需要删除的用户收藏主键
     * @return 结果
     */
    @Override
    public int deleteSysUserCollectByIds(Long[] ids)
    {
        return sysUserCollectMapper.deleteSysUserCollectByIds(ids);
    }

    /**
     * 删除用户收藏信息
     *
     * @param id 用户收藏主键
     * @return 结果
     */
    @Override
    public int deleteSysUserCollectById(Long id)
    {
        return sysUserCollectMapper.deleteSysUserCollectById(id);
    }
}
